import Api from './Api';

class CiTemplatePipeline extends Api<CiTemplatePipeline> {
  get prefix() {
    return `/devops/v1/project/${this.projectId}/ci_template_pipeline`;
  }

  saveTemplate(data: any) {
    return this.request({
      url: `${this.prefix}/save`,
      method: 'post',
      data,
    });
  }
}

const ciTemplatePipelineApi = new CiTemplatePipeline();
const ciTemplatePipelineApiConfig = new CiTemplatePipeline(true);
export { ciTemplatePipelineApi, ciTemplatePipelineApiConfig };
